# get the layers from the gdbgdbpth <-list.files(tmp2, pattern ='\\.gdb$', full.names = T)lyrs <-st_layers(gdbpth)$name# read the layerdat <-st_read(dsn = gdbpth, lyrs)
Reading layer `EJSCREEN_Full_with_AS_CNMI_GU_VI' from data source
`/tmp/Rtmpu9wVd2/fileb64641422416/EJSCREEN_2022_Supplemental_with_AS_CNMI_GU_VI_Tracts.gdb'
using driver `OpenFileGDB'
Simple feature collection with 86000 features and 158 fields
Geometry type: MULTIPOLYGON
Dimension: XY
Bounding box: xmin: -19951910 ymin: -1617130 xmax: 16259860 ymax: 11554350
Projected CRS: WGS 84 / Pseudo-Mercator
Intersect the layer with the Tampa Bay watershed.
# intersect the layer with the tb watersheddattb <- dat %>%st_transform(crs =st_crs(tbshed)) %>%st_make_valid() %>%st_intersection(tbshed)
old-style crs object detected; please recreate object with a recent sf::st_crs()
old-style crs object detected; please recreate object with a recent sf::st_crs()
Warning: attribute variables are assumed to be spatially constant throughout
all geometries